﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.ServiceModel.Web;
using System.Text;
using RESTService.Dominio;

namespace RESTService
{

    [ServiceContract]
    public interface IServicios
    {

        [OperationContract]
        [WebInvoke(Method = "POST", UriTemplate = "Servicios", ResponseFormat = WebMessageFormat.Json)]
        Servicio CrearServicio(Servicio servicio);

        [OperationContract]
        [WebInvoke(Method = "GET", UriTemplate = "Servicios/{codigo}", ResponseFormat = WebMessageFormat.Json)]
        Servicio ObtenerServicio(string codigo);

        [OperationContract]
        [WebInvoke(Method = "PUT", UriTemplate = "Servicios", ResponseFormat = WebMessageFormat.Json)]
        Servicio ModificarServicio(Servicio servicio);

        [OperationContract]
        [WebInvoke(Method = "DELETE", UriTemplate = "Servicios", ResponseFormat = WebMessageFormat.Json)]
        void EliminarServicios(string codigo);

        [OperationContract]
        [WebInvoke(Method = "GET", UriTemplate = "Servicios", ResponseFormat = WebMessageFormat.Json)]
        List<Servicio> ListarServicios();
        

    }


}
